<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改延期申请')"/>
    <!--<th:block th:include="include :: select2-css" />-->
    <link th:href="@{/ajax/libs/bootstrap-tagsinput/tagsinput.css}" rel="stylesheet">
    <link th:href="@{/ajax/libs/jQuery-ui/jquery-ui.css}" rel="stylesheet">
    <style>
        label {
            font-weight: bold;
        }

        @font-face {
            font-family: 'huawen';
            src: url("/fonts/huawen.woff2");
        }
    </style>
</head>

<body style="background-color: #F4F6FA;font-size: 13px;font-family:'huawen' ;font-weight: bold">
<div class="main-content" style="margin: 0;padding: 0">

    <form id="form-user-add" th:object="${twfDefer}" class="form-horizontal" style="background-color: #F4F6FA">
        <input type="hidden" name="pkId" th:field="*{pkId}">
        <input type="hidden" name="wfId" th:field="*{wfId}">
        <input type="hidden" name="sendId" th:field="*{sendId}">
        <input type="hidden" name="suserNo" th:field="*{suserNo}"/>
        <input type="hidden" name="suserName" th:field="*{suserName}"/>
        <input type="hidden" name="flagInt" value="0">
        <input type="hidden" name="flagString" value>
        <input type="hidden" name="spareInt" value="0">
        <input type="hidden" name="spareString" value>
        <div class="col-sm-12" style="display: flex;">
            <div class="col-sm-12 entering-page" style="width: 100%;">
                <!--    延期申请    -->
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">修改延期申请</h4>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">工单编号：</label>
                        <div class="col-sm-2">
                            <span class="tworkformprocess-span">[[*{workFormNo}]]</span>
                        </div>
                        <label class="col-sm-2 control-label entering-pd">来自单位：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{sdeptName}]]</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">工单主题：</label>
                        <div class="col-sm-2">
                            <span class="tworkformprocess-span">[[${tworkFormBase.wsTopic}]]</span>
                        </div>
                    </div>
                </div>
                <!--内容描述：-->
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">内容描述：</label>
                        <div class="col-sm-8">
                                <textarea maxlength="3500"
                                          class="form-control workRemark"
                                          rows="3" style="height: 160px" readonly UNSELECTABLE="on">[[${tworkFormBase.fmContent}]] </textarea>
                        </div>
                    </div>
                </div>
                <!--办理要求-->
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">办理要求：</label>
                        <div class="col-sm-8">
                            <textarea maxlength="3500"
                                      class="form-control workRemark"
                                      rows="3" style="height: 80px" readonly UNSELECTABLE="on">[[${twfSendBack.sendDesc}]] </textarea>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">申请单位：</label>
                        <div class="col-sm-2">
                            <span class="tworkformprocess-span">[[*{adeptName}]]</span>
                        </div>
                        <label class="col-sm-2 control-label entering-pd">申请单位：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[*{auserName}]]</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd" style="color: #FF812E">原办理期限：</label>
                        <div class="col-sm-2">
                            <span class="tworkformprocess-span">[[${#dates.format(twfDefer.limitOld,'yyyy-MM-dd HH:mm:ss')}]]</span>
                        </div>
                        <label class="col-sm-2 control-label entering-pd" style="color: #FF1A0B">延期至：</label>
                        <div class="col-sm-3">
                            <input type="text" th:field="*{delayTo}" class="form-control postpone"
                                   id="postpone"
                                   placeholder="请输入时间">
                            <div class="input-group-append entering-pd" style="position: absolute;top: 12px;right: 30px;">
                                <span class="glyphicon glyphicon-calendar"></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd" style="color: red">延期理由：</label>
                        <div class="col-sm-4">
                            <select name="delayRc" id="delayRc"
                                    th:with="delayRn=${@commonServiceImpl.delayReasonList()}"
                                    onchange="dropChgSendTextOnly(this,'delayRn');"
                                    class="form-control m-b phoneCategory">
                                <th:block th:each="item : ${delayRn}">
                                    <option th:text="${item['CSText']}" th:value="${item['CSValue']}"></option>
                                </th:block>
                            </select>
                            <textarea id="delayRn" th:field="*{delayRn}" maxlength="3500"
                                      class="form-control opinion"
                                      rows="3"
                                      style="height: 130px" required="required"></textarea>
                        </div>
                        <!--按钮-->
                        <div class="col-sm-2 mb20" style="display: flex;justify-content: center;padding-top: 7%;">
                            <div class="col-sm-3" style="display: flex;justify-content: space-evenly;margin-left: 200px">
                                <input type="hidden" name="deferState" id="deferState" th:value="${act != 0 ? twfDefer.deferState : 10}">
                                <button type="button" class="btn btn-sm btn-success" onclick="sub()">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <button type="button" class="btn btn-sm btn-light" onclick="closeItem()">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>

<script th:src="@{/ajax/libs/layui/laydate.js}"></script>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/bootstrap-tagsinput/tagsinput.min.js}"></script>
<script th:src="@{/ajax/libs/jQuery-ui/jquery-ui.js}"></script>
<script th:src="@{/js/extension.js}"></script>

<script>
    var prefix = ctx + "system/mInterior";
    function sub(){
        if ($.validate.form()) {
            let url = prefix + "/cmnFile/twfDeferEditJson";
            let data = $('#form-user-add').serializeArray();
            $.operate.saveTab(url,data);
        }
    }
</script>
</body>
</html>

